import django.forms as forms
from main import models
from captcha.fields import CaptchaField

class personForm(forms.ModelForm):
   captcha = CaptchaField()
   class Meta:
        model = models.person
        fields = ['name', 'surname', 'organization','email','password']
        widgets = {'password':forms.PasswordInput()}

class ticketForm(forms.ModelForm):
   class Meta:
        model = models.ticket
        fields = ['mapreduce','data']

class datasetForm(forms.ModelForm):
   data = forms.FileField(label='zipped data',required=True)
   class Meta:
        model = models.dataset
        fields = ['caption','description']